package org.bright.service;

import com.github.pagehelper.PageInfo;
import org.bright.dto.OrderItemDTO;
import org.bright.entity.PurchaseOrders;
import com.baomidou.mybatisplus.extension.service.IService;
import org.bright.vo.PurchaseOrderVO;

import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

/**
 * <p>
 * 采购订单表 记录采购订单信息 服务类
 * </p>
 *
 * @author bright
 * @since 2024-10-21
 */
public interface IPurchaseOrdersService extends IService<PurchaseOrders> {

    int createOrders(List<OrderItemDTO> orderItems) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException;

    PageInfo<PurchaseOrderVO> selectAll(Integer pageNum);

    List<PurchaseOrderVO> selectAllByOrderId(String orderId);

    int updateStatus(String orderId,int supplierId) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException;

    int updateStatusByOrderId(String orderId) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException;
}
